package edu.zut.pioneer.notice.domain;


import edu.zut.pioneer.base.domain.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.Table;
import java.util.Date;

@Entity
@Table(name="notice")

public class Notice extends BaseEntity<Long> {

    @Column(name= "name" )
    private String name;

    @Column(name = "date", nullable = false)
    private Date date;

    @Column(name= "content" )
    private String content;
    @JoinColumn(name = "notice_type_id")
    @Column(name="notice_type_id")
    private long type_id;

    public Notice(){}



    public Notice(Date date, String name, String content,int type_id) {
        this.name = name;
        this.date = date;
        this.content = content;
        this.type_id = type_id;
    }

    @Override
    public String toString() {
        return "Store{" +"name='" + name +"date="+date+"content="+content+ '\'' + ", type_id='" + type_id +'}';
    }

    public String getName() {
        return name;
    }

    public Date getDate() {
        return date;
    }

    public String getContent() {
        return content;
    }

    public long getType_id() {
        return type_id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public void setType_id(long type_id) {
        this.type_id = type_id;
    }
}
